home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr23 / csmac13a.zip / JB-LEARN.DOC < prev    next >
Text File  |  1995-01-22  |  23KB  |  504 lines

  1.                                  JB-LEARN
  2.                                Version 1.1
  3.                          for {COMMO} Version 6.4X
  4.                       Copyright (C) 1995, Jeff Bishop
  5.                              January 22, 1995
  6.  
  7. Introduction
  8.  
  9.      I have always loved writing {COMMO} macros.  After examining other
  10.      telecommunication programs to see what could be added to {COMMO} I came
  11.      up with the idea of writing a automatic learn macro for {COMMO}.
  12.  
  13.      The {COMMO} macro language is very complex.  Many users have
  14.      been scared of it due to this fact.  I thought to myself
  15.      "what could I do to make it easier".  I decided to write a
  16.      macro that would create {COMMO} macros for login activities
  17.      (or any activity the user wishes).  After weeks of work, JB
  18.      Learn was born to satisfy this requirement/need.
  19.  
  20. What Can JB-Learn do?
  21.  
  22.      JB-Learn has the following features:
  23.  
  24.      -    A very solid learn engine to create ready-to-run macros
  25.           after learn mode is complete.
  26.  
  27.      -    A learn data file capacity to make future learning more
  28.           intelligent.  The learn macro learns as you use it.  This
  29.           is a first in the BBS community.  Find another learn
  30.           engine that can do that (except CS-LEARN for {COMMO}).
  31.           The user has complete control as to what it learns.
  32.  
  33.      -    The learn data file will process {COMMO} variables for
  34.           you.  This gives you even more power.  This allows for great
  35.           flexibility when using CS-MAC since it defines a wealth of
  36.           variables that you can use.
  37.  
  38.      -    Have complete control of your learning experience.  You
  39.           make the decisions if you want to.  This provides the
  40.           ability to correct mistakes that the learn can not
  41.           handle.  This provides the ability to create very solid
  42.           macros.  Just think, you tell the teacher what to do and get a
  43.           better grade for it.
  44.  
  45.      -    Automatic detection of front end mailers.  No need to
  46.           press <ESCAPE> twice any more (even during learning) as long as
  47.           EMSI protocol is being used.
  48.  
  49.      -    The learn can automatically try to log you in without
  50.           user intervention.  This is similar to most other
  51.           conventional learn engines available in other
  52.           communication programs.
  53.  
  54.      -    The ability to add SSLOOK logic in your macros. This will make them
  55.           more stream lined for those nagging prompts often seen on BBS's.
  56.  
  57.      -    The macro is FREE for your use.  The source code is very
  58.           well commented for a great learning experience.
  59.  
  60. Installing JB-LEARN
  61.  
  62.      Installing JB-Learn is very easy.  Follow these steps:
  63.  
  64.      1.   Copy the file JB-LEARN.MAC to the {COMMO} home directory (the
  65.           directory that you installed {COMMO} in).
  66.  
  67.      2.   The file MY_COMMO.MAC is a slightly modified version of the
  68.           {COMMO} 6.41 COMMO.MAC file.  This macro file has a label that
  69.           points to JB-LEARN.MAC.  In addition, it has been added to the
  70.           ALT-U utility menu.  Besides that, it is a standard COMMO.MAC
  71.           file.  If you have not modified your COMMO.MAC file extensively
  72.           then simply copy this file over your existing COMMO.MAC.
  73.           Otherwise, continue to step 3.
  74.  
  75.      3.   Add the following line to the end of your COMMO.MAC
  76.           file that is located in your {COMMO} home directory:
  77.  
  78.           {:LEARN} {GOTO JB-LEARN,JB-LEARN.MAC} {STOP}
  79.  
  80.           This line will make it a lot easier to add macro links to your
  81.           dialing directory.
  82.  
  83. Adding the Macro Links
  84.  
  85.      This section describes how to add macro links to your
  86.      dialing directory.  If you are using JB-Learn within CS-MAC,
  87.      this is not necessary.  CS-MAC accommodates JB-Learn by using
  88.      the standard login macro links used for mail runs on others.
  89.      These are GLR (generic login) and QWK (mail run).  The way
  90.      that CS-MAC knows that you are wanting to perform a learn is
  91.      by you selecting the learn from the CS-MAC menu structure.
  92.      The learn macro can be setup by selecting ALT-M (macro
  93.      menu), O (online menu, which will be automatically selected
  94.      if you are online), R (Learn).  That is all you have to do.
  95.  
  96.      If you have downloaded JB-Learn as a stand alone package
  97.      then you will need to add macro links to your dialing
  98.      directory.  Here is an example of what this would look like:
  99.  
  100.      Demodulator {290 2807} {PASSWORD} {LEARN} {} 00/00/00
  101.  
  102.      The third set of braces ({}) is where the macro link is
  103.      placed.  Your macro link should look exactly like that one
  104.      (assuming you added the line to commo.mac in the previous
  105.      section).  Your dialing directory may have other settings (or
  106.      even a linked macro already).  Simple substitute the linked
  107.      macro you may have installed for the BBS with this one.  All
  108.      other parameters will be used during your login (terminal
  109.      settings, password, etc.).
  110.  
  111. Before Running JB-Learn
  112.  
  113.      Before you run JB-Learn you should have a very solid
  114.      understanding of what it takes to login to your system.  The
  115.      key thing you must determine is if the BBS uses hot keys or
  116.      whether all responses require that the <ENTER> key be
  117.      pressed.  Try logging into your BBS a few times to insure you
  118.      understand what responses are required.  This will be very
  119.      important when you make decisions about the login.
  120.  
  121. Special Variables Defined in JB-Learn
  122.  
  123.      JB-Learn uses a few special variables that control some of
  124.      its features.  This section will review each of these in
  125.      detail.  These are located at the top of JB-LEARN.MAC.  Here
  126.      is the list of variables and their definitions:
  127.  
  128.      AUTORESP  This variable controls whether or not the user
  129.                should be asked to confirm responses found in the
  130.                data file or not.  If this is set to 'N', the user
  131.                will have to confirm each match.  This is how you
  132.                will achieve best results.  If you are daring set
  133.                this to 'Y' and the learn will assume what it
  134.                finds is correct.  You may or may not get a macro
  135.                that works with AUTORESP set to 'Y'.  This is set
  136.                to 'N' as the default.
  137.  
  138.      CAPTFILE  Jb-Learn uses a capture file to parse the BBS
  139.                prompt.  This variable defines the name of this
  140.                capture file.  The default name is
  141.                COMMO_HOME\{JBLRN}.CAP.  This file is accessed a
  142.                lot.  If you have a ram disk, re-assign this
  143.                variable to a filename that would be placed in
  144.                your ram disk.  This will speed up JB-Learn a great
  145.                deal.
  146.  
  147.      DATAFILE  This variable contains the name of the learn
  148.                target/response data file.  The default is
  149.                LEARN.DAT.
  150.  
  151.      FON_FILE  This defines the name of the backup dialing directory FON file.
  152.                This is used when adding a new entry to your personal dialing
  153.                directory.  The default value for this variable is
  154.                COMMO_HOME\{JBLRN}.FON.
  155.  
  156.      NOV_MENU  This variable defines whether a full-screen menu should be
  157.                shown, or just an expert one line menu. Set to Y if you want
  158.                novice menus.  Any other value assumes expert menu.
  159.  
  160.      SSLKAUTO  Set this variable to Y if you want SSLOOKS to be automatically
  161.                generated instead of LOOKFOR/SEND pairs.  This is only going to
  162.                happen in the area that the data file is processed.  It will
  163.                not affect the JB-Learn menu.
  164.  
  165.      WAITTIME  This variable defines the length of time after all
  166.                modem activity stops before the learn process
  167.                starts interacting with the user.  The default is
  168.                15 seconds.  Change the definition if you would
  169.                like.  Be careful though to keep it long enough. 
  170.                Making it too short will have disastrous affects
  171.                in the learn engine.  If this variable is set as
  172.                NULL, then this auto learn type feature is turned off.
  173.  
  174. Running Jb-Learn
  175.  
  176.      Once the link has been added to your dialing directory, just
  177.      open the dialing directory with ALT-D and dial away.  The
  178.      learn will start once you have connected.
  179.  
  180.      The following paragraphs will describe what activities will
  181.      take place during the learn run.  Study this carefully.
  182.  
  183. JB-Learn Flow (What Actually Happens)?
  184.  
  185.      After you connect, you will see the following message on the
  186.      status line:
  187.  
  188.      <ESC> FOR LEARN MODE
  189.  
  190.      You can press <ESCAPE> at any time to invoke the learn
  191.      processor.  Do NOT press <ESCAPE> until all output from the
  192.      modem has stopped.  This is crucial.  The WAITTIME variable
  193.      determines how long the macro will wait after modem activity
  194.      is seen before invoking the learn processor.  If you do not
  195.      press <ESCAPE> the macro will automatically invoke the
  196.      processor after the number of seconds you have defined in
  197.      WAITTIME.  This is why WAITTIME should be set to at least 5
  198.      to 7 seconds.
  199.  
  200.      Once the learn processor is invoked it will search the
  201.      capture file for the BBS prompt.  If it can not find one, it
  202.      will prompt the user for it.  So, be very observant when you
  203.      look at the screen.  Most of the time the macro will
  204.      determine the prompt.  In very rare cases, it may not find
  205.      it.  This happens mostly if you press <ESCAPE> while the
  206.      modem is sending data to the terminal screen.  Remember to
  207.      not press <ESCAPE> until ALL output has stopped.  Once the
  208.      BBS prompt has been determined, processing will continue.
  209.  
  210.      If this is the first time through the processor, we will
  211.      need to define the macro file and label name to write to.
  212.      You will be prompted for this information.  I suggest that
  213.      you do NOT write to COMMO.MAC or JB-LEARN.MAC.  Name the
  214.      macro something unique.  This is completely up to you though.
  215.      You will next define the label name used for the macro.  The
  216.      learn processor will attempt to create a label name up to 10
  217.      characters from the system name you have dialed.  You will be
  218.      presented with a label name prompt to edit the label if you
  219.      so wish.  Remember, this label is going to be used in the
  220.      dialing directory so make it something meaningful.  The macro
  221.      name will also be used.  Keep both names meaningful.
  222.  
  223.      You will be prompted to see if you would like to use auto
  224.      learn mode.  This allows you to set the AUTORESP variable.
  225.      If set to 'Y', no prompting to confirm targets/responses is
  226.      done.  See documentation about AUTORESP defined earlier in this file.
  227.  
  228.  
  229.      The learn processor will now begin looking through the data
  230.      file.  It is looking for a match from the BBS prompt it knows
  231.      about with the targets defined in the data file.  If it can
  232.      not find one, then control passes to the special learn menu.
  233.      This menu will be described later.  It looks for a match and
  234.      stops at the first one it finds.  This is why placement of
  235.      the targets/responses is very important.  If it finds one, it
  236.      first checks to see if the response is a {COMMO} variable.
  237.      If it is, it translates it.  You are then asked to confirm
  238.      the response to the BBS prompt.  If you answer 'Y', the code
  239.      will be written to the macro and the learn processor begins
  240.      all over again.  It will wait for your key press or the
  241.      timeout period before attempting to process the next BBS
  242.      prompt.  If you answer 'N', you will be taken to the learn menu.
  243.  
  244.      The learn processor will continue this way until you are
  245.      done.  We will now discuss the learn menu.  This menu provides
  246.      a great deal of control not available in other areas of the
  247.      learn engine.
  248.  
  249. The JB-Learn Menu
  250.  
  251.      Here is what the learn menu will look like:
  252.  
  253.      JB-LEARN RESPONSE TYPE MENU - VERSION 1.1
  254.      BBS PROMPT:
  255.  
  256.      C - CONTINUE LEARNING
  257.  
  258.      E - SEND <ENTER>
  259.  
  260.      F - BYPASS FRONT END BBS MAILER WITH TWO <ESCAPES>
  261.  
  262.      H - TREAT AS A SINGLE KEY HOT KEY (NO <CR>)
  263.  
  264.      I - INSERT COMMENT INTO MACRO
  265.      L - TREAT AS A SSLOOK STRING: (SSLOOK COUNT# )
  266.  
  267.      P - TREAT AS A PASSWORD
  268.  
  269.      Q - QUIT JB-LEARN
  270.  
  271.      R - REVISE/EDIT BBS PROMPT
  272.  
  273.      S - ENTER STANDARD BBS RESPONSE (WITH <CR>)
  274.  
  275.      W - SET WAIT TIME:
  276.      X - TOGGLE BETWEEN NOVICE AND EXPERT MENU
  277.      ENTER CHOICE: C,E,F,H,I,L,N,P,Q,R,S,W,X: 
  278.  
  279.      The following paragraphs describe each option in this menu
  280.           in detail.
  281.  
  282. C - CONTINUE LEARNING
  283.      This option simply continues to learn.  Use this if you
  284.      accidentally came here by mistake.
  285.  
  286. E - SEND <ENTER>
  287.      Use this option if you just need to respond to the BBS
  288.      prompt with a <ENTER> key.
  289.  
  290. F - BYPASS FRONT END BBS MAILER WITH TWO <ESCAPES>
  291.      JB-Learn will attempt to recognize front end mailers
  292.      automatically.  This option should not be needed.  This will
  293.      send two <ESCAPE> characters to bypass a front end mailer.  JB-Learn only
  294.      recognizes those front end mailers that use the EMSI protocol.
  295.  
  296. H - TREAT AS A SINGLE KEY HOT KEY (NO <CR>)
  297.      Many systems use what are called hot keys.  These are menu
  298.      choices that simply require a one character response (no
  299.      <ENTER> required).  This option will provide a way of sending
  300.      these hot keys.
  301.  
  302. I - INSERT COMMENT INTO MACRO
  303.      This option allows you to write a line to the macro file.
  304.      This could be a comment or even additional commands.  This
  305.      option simply takes what you enter and writes it to the
  306.      macro.  Be very careful with this one.
  307.  
  308. L - TREAT AS A SSLOOK STRING
  309.      This menu option allows you to create SSLOOK strings and place them into
  310.      your macros.  Consult the {COMMO} documentation on what a SSLOOK command
  311.      will do.  Basically, the SSLOOK should be used when nagging prompts
  312.      appear often during a login session.  The SSLOOK will send the
  313.      string/response you tell it when it sees the target.  You may have up to
  314.      15 SSLOOKS active at one time.  When the menu appears, it will show you
  315.      the current number of active SSLOOKS.  This will help you when running
  316.      JB-Learn.  Keep in mind that after you have reached 15 SSLOOKS, this menu
  317.      option is no longer visible.  Adding a LOOKFOR (any other method of
  318.      responding to BBS activity then this option) will reset the SSLOOK count
  319.      back to 0.  Again, consult the {COMMO} documentation (macro.doc) for more
  320.      information on this capability.
  321.  
  322. P - TREAT AS A PASSWORD
  323.      This option will send your password to the host and write
  324.      macro code to do it in your macro.  The routine will check to
  325.      see if you defined a password in the dialing directory.  If
  326.      you have, it simply uses it.  If you did not, you will be
  327.      asked for the password.
  328.  
  329. Q - QUIT JB-LEARN
  330.      This option terminates the learn processor.  When this
  331.      happens, final code is written to the macro file.  You are
  332.      also asked if you want to create a new dialing directory
  333.      entry in your dialing directory file.  If you answer yes you
  334.      will be prompted for the system name (a default is provided
  335.      if known), and the phone number will be asked for.  The
  336.      routine will place the new entry just after the one already
  337.      defined in the dialing directory.  The string '(WITH LEARN)'
  338.      is appended to the system name.  If no entry matching the
  339.      system name is seen, the entry will be placed at the end of
  340.      your dialing directory.  The linked macro will automatically
  341.      be defined for you based upon the input entered earlier. A backup of
  342.      your original dialing directory file is made prior to any modifications.
  343.      The name of this dialing directory file is defined with the variable
  344.      FON_FILE.  Once this is done, the variables are cleared out of memory and
  345.      the JB-Learn processor will be terminated.
  346.  
  347. R - REVISE/EDIT BBS PROMPT
  348.      This option allows you to edit the BBS prompt.
  349.  
  350. S - ENTER STANDARD BBS RESPONSE (WITH <CR>)
  351.      This option allows you to enter a string to send to the BBS.
  352.      This string will be terminated with a <ENTER> character.
  353.  
  354. W - SET WAIT TIME:
  355.      This option allows you to update the WAITTIME variable
  356.      described above.
  357.  
  358. X - TOGGLE BETWEEN NOVICE AND EXPERT MENU
  359.      This menu option toggles between the novice menu and the expert menu.
  360.      You will be presented with a 1 line menu showing the letters available
  361.      when in expert mode.  When in novice mode, the entire menu will be shown.
  362.  
  363. The JB-Learn Data File Format
  364.  
  365.      One of JB-Learn's strongest features is its use of a special
  366.      data file to process potential BBS prompts and have possible
  367.      responses to them.  This is accomplished with the use of the
  368.      LEARN.DAT data file.  This file has a special data format
  369.      that the macro uses to parse through.  Here are the rules for
  370.      this data file:
  371.  
  372.      1.   Any comments desired in the file should begin with a
  373.           space character in column 1.  Any lines beginning with a
  374.           space are ignored.
  375.  
  376.      2.   The file may be of any size.
  377.  
  378.      3.   The response / target lines should look like this:
  379.  
  380. RESPONSE,TARGET
  381. RESPONSE|,TARGET
  382. N|,MORE Y/N?
  383. %_PAS|,PASSWORD:
  384.  
  385.      The response comes first and begins in column 1 of the line.
  386.      {COMMO} variables may be used.  Precede them with a %
  387.      character.  If the value of the variable used in the data
  388.      file is blank, you will be asked to define it during the
  389.      learn macro processor.  Other special {COMMO} characters may
  390.      also be used in the response string.  A list of these is
  391.      below:
  392.  
  393.      CHARACTER DESCRIPTION
  394.  
  395.      ^M or |   Carriage return
  396.      ^J        Linefeed
  397.      ^I        TAB
  398.      ^L        Formfeed
  399.      ^[        Escape
  400.      ^G        Bell
  401.      ^S        XOFF
  402.      ^Q        XON
  403.      ^Z        End of file
  404.  
  405.      The response string is separated from the target (BBS
  406.      prompt) by a comma ',' character.  Look at the examples shown
  407.      above.  These show {COMMO} variables being used, standard
  408.      strings, and the use of special characters (like | to
  409.           represent a <CR> character).
  410.  
  411.      The macro will append strings to the data file if you tell
  412.      it to when asked.  These entries will follow the format
  413.      described here.  This format is also used in the CS-LEARN
  414.      macro product as well.  So, if you are using that one as
  415.      well, the data file will work the same way.
  416.  
  417. The Future of JB-Learn
  418.  
  419.      Like any other product, I hope to continue to evolve
  420.      JB-Learn.  Here are a few ideas that you will probably see in
  421.      future versions of JB-Learn:
  422.  
  423.      -    A more automated setup routine to add the JB-Learn link
  424.           to your dialing directory.  This will help the beginning
  425.           users a great deal.
  426.  
  427.      -    I would like to expand the LEARN.DAT data file to
  428.           contain more strings and responses.  This will help all of us.
  429.           If you want to contribute, just send them my way.
  430.  
  431.      -    Add all user suggestions that are possible with {COMMO}'s rich
  432.           programming language.  Start sending them my way.
  433.  
  434.      Again, this macro is another learning project for all of you
  435.      to study.  If you make changes to it that are significant in
  436.      nature, please send them my way.  My contact information is
  437.      located at the end of this document.  Let us make this thing
  438.      sing and dance even better!
  439.  
  440. Thanks
  441.  
  442.      I would like to thank the following people:
  443.  
  444. My Wife (Keri)
  445.      My wonderful wife who puts up with a programmer that stays
  446.      up all night.  She tells me she is my second love.  Well,
  447.      hmmmmm ... Just kidding <GRIN>.
  448.  
  449. Fred Brucker
  450.      I would like to thank Fred for the great product {COMMO}.  I
  451.      would also like to thank him for the great SFI enhancements
  452.      he has made to the program.  Without that, it would have
  453.      never even been possible to use it.  Thank you very much
  454.      Fred! Keep up the good work!
  455.  
  456. Chuck Seyboldt
  457.      Thanks to Chuck for the wonderful suggestions regarding
  458.      {COMMO} macro programming tricks and tips.  Good work sir and
  459.      keep CS-MAC alive.  You are an inspiration to me.
  460.  
  461. Jim Bennett
  462.      I would like to thank Jim for the technical review of JB
  463.      Learn.  Without it some nasty little bugs would have been
  464.      seen by all of you.  Thanks Jim.  Also, thanks to Jim for the
  465.      use of his BBS to distribute JB-Learn (more on that later).
  466.  
  467. Contact Information
  468.  
  469.      I value all of your input.  Please contact me with any
  470.      suggestions you may have.  You can contact me via the following methods:
  471.  
  472.      Jeff Bishop
  473.      Mailing Address: 420 E Yavapai RD. NO. H Tucson, AZ 85705
  474.      E-Mail Address : JBISHOP@PRIMENET.COM
  475.      Voice Phone    : 1-602-888-1456 (evenings before 12:00AM EST).
  476.  
  477.      I can also be reached in the COMMO conference in the fidonet and WME
  478.      message networks.  Post a message to "jeff bishop" and I will surely
  479.      respond to it.
  480.  
  481. Getting JB-Learn Updates
  482.  
  483.      JB-Learn is distributed in two different packages.  I am
  484.      distributing it as a stand alone package and it is also in the
  485.      CS-MAC package (version 13 and above).  If you are reading this from
  486.      the CS-MAC archive, this may or may not be the latest one.  Use the
  487.      information below to get the latest and greatest version.
  488.  
  489.      If you have access to the internet, you can use ftp to get JB Learn.
  490.      Ftp to ftp.primenet.com.  Login as anonymous and send your e-mail
  491.      address as the password.  Once logged in, cd to  /users/j/jbishop/commo.
  492.      Once here, get the file jbl-*.zip.  This will get you the latest
  493.      version. You are also welcome to get the latest version of CS-MAC
  494.      here as well. Get the file cs*.zip.
  495.  
  496.      If you wish, you can also ftp to ftp.nlbbs.com. Login as anonymous and
  497.      send your mail address as password. Once here, cd to /pub/cs-mac.
  498.  
  499.      If you do not have access to the internet, you can log in to the
  500.      Demodulator BBS.  The phone number is 1-602-290-2807.  Use 'COMMO RELEASE'
  501.      as your first and last name.  Use 'guest' as the password.  A menu will
  502.      be presented to allow you to pick JB-Learn from.
  503.      In addition, other {COMMO} products can be downloaded from this menu. 
  504.